home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / vim_src.zip / REGEXP.H < prev    next >
C/C++ Source or Header  |  1993-01-12  |  2KB  |  50 lines

  1. /* vi:ts=4:sw=4
  2.  * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
  3.  *
  4.  * This is NOT the original regular expression code as written by
  5.  * Henry Spencer. This code has been modified specifically for use
  6.  * with the VIM editor, and should not be used apart from compiling
  7.  * VIM. If you want a good regular expression library, get the
  8.  * original code. The copyright notice that follows is from the
  9.  * original.
  10.  *
  11.  * NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
  12.  *
  13.  * Definitions etc. for regexp(3) routines.
  14.  *
  15.  * Caveat:    this is V8 regexp(3) [actually, a reimplementation thereof],
  16.  * not the System V one.
  17.  */
  18.  
  19. #ifndef _REGEXP_H
  20. #define _REGEXP_H
  21.  
  22. #define NSUBEXP  10
  23. typedef struct regexp {
  24.     char           *startp[NSUBEXP];
  25.     char           *endp[NSUBEXP];
  26.     char            regstart;    /* Internal use only. */
  27.     char            reganch;    /* Internal use only. */
  28.     char           *regmust;    /* Internal use only. */
  29.     int             regmlen;    /* Internal use only. */
  30.     char            program[1]; /* Unwarranted chumminess with compiler. */
  31. }                regexp;
  32.  
  33. /* regexp.c */
  34. regexp *regcomp __ARGS((char *));
  35. int regexec __ARGS((regexp *, char *, int));
  36. /* int cstrncmp __ARGS((char *, char *, int)); */
  37. char *cstrchr __ARGS((char *, int));
  38.  
  39. /* regsub.c */
  40. int regsub __ARGS((regexp *, char *, char *, int, int));
  41.  
  42. /* search.c */
  43. extern void     regerror __ARGS((char *));
  44.  
  45. #ifndef ORIGINAL
  46. extern int        reg_ic;         /* set non-zero to ignore case in searches */
  47. extern int        reg_magic;        /* set zero to disable magicness of .*[~& */
  48. #endif
  49. #endif    /* _REGEXP_H */
  50.